Class Seeder

Summary

Fully Qualified Name: CodeIgniter\Database\Seeder

Description

Class Seeder

Methods

Name Description Defined By
__construct() Seeder constructor. Seeder
call() Loads the specified seeder and runs it. Seeder
run() Run the database seeds. This is where the magic happens. Seeder
setPath() Sets the location of the directory that seed files can be located in. Seeder
setSilent() Sets the silent treatment. Seeder

Method Details

__construct()

Seeder constructor.

Parameter Name Type Description
$config \BaseConfig
$db \BaseConnection

Returns:

call()

Loads the specified seeder and runs it.

Parameter Name Type Description
$class string

Returns:

run()

Run the database seeds. This is where the magic happens.

Child classes must implement this method and take care of inserting their data here.

Returns: mixed

setPath()

Sets the location of the directory that seed files can be located in.

Parameter Name Type Description
$path string

Returns: \Seeder

setSilent()

Sets the silent treatment.

Parameter Name Type Description
$silent bool

Returns: \Seeder

Top